package com.fymxy.question_bank_management.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fymxy.question_bank_management.pojo.Course2teacher;
import com.fymxy.question_bank_management.pojo.Course2teacherKey;
import java.util.List;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface Course2teacherMapper {

    @Delete("delete from course2teacher where course_no = #{courseKey}")
    int deleteByCourseKey(Integer courseNo);

    @Insert("insert into course2teacher(course_name,teacher_no) values (#{courseName},#{teacherNo})")
    int insert(Course2teacher record);

    @Select("select * from course2teacher")
    IPage<Course2teacher> selectAllCourse(Page page);

    int insertSelective(Course2teacherKey record);

}